<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改会计科目</title>
	<include file="Public:header" />
	<style type="text/css">
		.m-input{width:190px; border:1px solid #ccc; padding:2px;}
		.select{width:190px; border:1px solid #ccc; height:25px; padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			if($('#code').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入编号',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#title').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入名称',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#orderid').val()=='')
			{
				$.messager.show({title:'提示',msg:'请正确输入排序号，只能为数字',timeout:5000,showType:'slide'});
				return false;
			}
			$('#form1').submit();
		}
	</script>
</head>
<body class="">
	<div class="demo-info space-out-10px">
		<div class="demo-tip icon-tip"></div>
		<div>会计科目设置</div>
	</div>
	<form id="form1" method="post" action="{:U('Finance/faccmas_edit_save')}">
		<table class="space-out-10px">
		<tr>
		<td>会计科目：</td><td><input readonly="true" type="text" id="code" name="code" value="{$mydata.code}" class="easyui-validatebox m-input" required="true" /></td>
		</tr>
		<tr>
		<td>名称：</td><td><input type="text" id="title" name="title" value="{$mydata.title}" class="easyui-validatebox m-input" required="true" /></td>
		</tr>
		<tr>
		<td>上级会计科目：</td><td><select id="parentid" name="parentid" class="easyui-combobox" editable="false" style="width:190px;">
								<option value='0'>顶级会计科目</option>
								<volist name='listlist' id="listlist">
								<option value='{$listlist["id"]}'><for start="2" end="$listlist['count']">|----</for>{$listlist['title']}</option>
								</volist>
								</select>
								<script type="text/javascript">$("#parentid").attr("value","{$mydata.parentid}");</script>
								</td>		
		</tr>
		<tr>
		<td>描述：</td><td><input type="text" id="note" name="note" value="{$mydata.note}" class="m-input" /></td>
		</tr>
		<php>$mydiyinfo=unserialize($mydata['diyinfo']);</php>
		<tr>
		<td>现金银行：</td><td>
		<input type="radio" name="diyinfo[bank]" value="Y"<if condition="$mydiyinfo['bank'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[bank]" value="N"<if condition="$mydiyinfo['bank'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<tr>
		<td>应收控制科目：</td><td>
		<input type="radio" name="diyinfo[arctrl]" value="Y"<if condition="$mydiyinfo['arctrl'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[arctrl]" value="N"<if condition="$mydiyinfo['arctrl'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<tr>
		<td>应付控制科目：</td><td>
		<input type="radio" name="diyinfo[apctrl]" value="Y"<if condition="$mydiyinfo['apctrl'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[apctrl]" value="N"<if condition="$mydiyinfo['apctrl'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<tr>
		<td>预收科目：</td><td>
		<input type="radio" name="diyinfo[precollected]" value="Y"<if condition="$mydiyinfo['precollected'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[precollected]" value="N"<if condition="$mydiyinfo['precollected'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<tr>
		<td>预付科目：</td><td>
		<input type="radio" name="diyinfo[prepaid]" value="Y"<if condition="$mydiyinfo['prepaid'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[prepaid]" value="N"<if condition="$mydiyinfo['prepaid'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<tr>
		<td>盈余科目：</td><td>
		<input type="radio" name="diyinfo[profit]" value="Y"<if condition="$mydiyinfo['profit'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[profit]" value="N"<if condition="$mydiyinfo['profit'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<tr>
		<td>贷方余额：</td><td>
		<input type="radio" name="diyinfo[credit]" value="Y"<if condition="$mydiyinfo['credit'] eq 'Y'"> checked</if> />是  
		<input type="radio" name="diyinfo[credit]" value="N"<if condition="$mydiyinfo['credit'] eq 'N'"> checked</if> />否
		</td>
		</tr>
		
		<td>排序号：</td><td><input type="text" id="orderid" name="orderid" value="{$mydata.orderid}" class="easyui-validatebox m-input" required="true" /></td>
		</tr>
		<tr>
		<td>状态：</td><td><input type="radio" name="status_flg" value="Y"<if condition="$mydata['status_flg'] eq 'Y'"> checked</if> />正常  <input type="radio" name="status_flg" value="N"<if condition="$mydata['status_flg'] eq 'N'"> checked</if> />禁用</td>
		</tr>
		<tr>
		<td>&nbsp;</td><td>
		<input type="hidden" id="parentstr" name="parentstr" value="{$mydata.parentstr}" />
		<input type="hidden" id="id" name="id" value="{$mydata.id}" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="chkfrm()">保存</a>
		<a href="{:U('Finance/faccmas_list')}" class="easyui-linkbutton" iconCls="icon-undo">取消</a>
		</td>
		</tr>
		</table>
	</form>

</body>
</html>
